3.1.44 \(\int (d \cot (e+f x))^n \csc ^4(e+f x) \, dx\) [44]

Optimal. Leaf size=51 \[ -\frac {(d \cot (e+f x))^{1+n}}{d f (1+n)}-\frac {(d \cot (e+f x))^{3+n}}{d^3 f (3+n)} \]

[Out]

-(d*cot(f*x+e))^(1+n)/d/f/(1+n)-(d*cot(f*x+e))^(3+n)/d^3/f/(3+n)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2687, 14} \begin {gather*} -\frac {(d \cot (e+f x))^{n+3}}{d^3 f (n+3)}-\frac {(d \cot (e+f x))^{n+1}}{d f (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d*Cot[e + f*x])^n*Csc[e + f*x]^4,x]

[Out]

-((d*Cot[e + f*x])^(1 + n)/(d*f*(1 + n))) - (d*Cot[e + f*x])^(3 + n)/(d^3*f*(3 + n))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rubi steps

\begin {align*} \int (d \cot (e+f x))^n \csc ^4(e+f x) \, dx &=\frac {\text {Subst}\left (\int (-d x)^n \left (1+x^2\right ) \, dx,x,-\cot (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \left ((-d x)^n+\frac {(-d x)^{2+n}}{d^2}\right ) \, dx,x,-\cot (e+f x)\right )}{f}\\ &=-\frac {(d \cot (e+f x))^{1+n}}{d f (1+n)}-\frac {(d \cot (e+f x))^{3+n}}{d^3 f (3+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.15, size = 45, normalized size = 0.88 \begin {gather*} -\frac {\cot (e+f x) (d \cot (e+f x))^n \left (2+(1+n) \csc ^2(e+f x)\right )}{f (1+n) (3+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d*Cot[e + f*x])^n*Csc[e + f*x]^4,x]

[Out]

-((Cot[e + f*x]*(d*Cot[e + f*x])^n*(2 + (1 + n)*Csc[e + f*x]^2))/(f*(1 + n)*(3 + n)))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 1.04, size = 5413, normalized size = 106.14

method result size
risch \(\text {Expression too large to display}\) \(5413\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cot(f*x+e))^n*csc(f*x+e)^4,x,method=_RETURNVERBOSE)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 56, normalized size = 1.10 \begin {gather*} -\frac {\frac {\left (\frac {d}{\tan \left (f x + e\right )}\right )^{n + 1}}{d {\left (n + 1\right )}} + \frac {d^{n} \tan \left (f x + e\right )^{-n}}{{\left (n + 3\right )} \tan \left (f x + e\right )^{3}}}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))^n*csc(f*x+e)^4,x, algorithm="maxima")

[Out]

-((d/tan(f*x + e))^(n + 1)/(d*(n + 1)) + d^n*tan(f*x + e)^(-n)/((n + 3)*tan(f*x + e)^3))/f

________________________________________________________________________________________

Fricas [A]
time = 5.45, size = 93, normalized size = 1.82 \begin {gather*} \frac {{\left (2 \, \cos \left (f x + e\right )^{3} - {\left (n + 3\right )} \cos \left (f x + e\right )\right )} \left (\frac {d \cos \left (f x + e\right )}{\sin \left (f x + e\right )}\right )^{n}}{{\left (f n^{2} - {\left (f n^{2} + 4 \, f n + 3 \, f\right )} \cos \left (f x + e\right )^{2} + 4 \, f n + 3 \, f\right )} \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))^n*csc(f*x+e)^4,x, algorithm="fricas")

[Out]

(2*cos(f*x + e)^3 - (n + 3)*cos(f*x + e))*(d*cos(f*x + e)/sin(f*x + e))^n/((f*n^2 - (f*n^2 + 4*f*n + 3*f)*cos(
f*x + e)^2 + 4*f*n + 3*f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \cot {\left (e + f x \right )}\right )^{n} \csc ^{4}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))**n*csc(f*x+e)**4,x)

[Out]

Integral((d*cot(e + f*x))**n*csc(e + f*x)**4, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))^n*csc(f*x+e)^4,x, algorithm="giac")

[Out]

integrate((d*cot(f*x + e))^n*csc(f*x + e)^4, x)

________________________________________________________________________________________

Mupad [B]
time = 0.67, size = 84, normalized size = 1.65 \begin {gather*} -\frac {\left (\frac {3\,\cos \left (e+f\,x\right )}{2}-\frac {\cos \left (3\,e+3\,f\,x\right )}{2}+n\,\cos \left (e+f\,x\right )\right )\,{\left (\frac {d\,\cos \left (e+f\,x\right )}{2\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}^n}{f\,{\sin \left (e+f\,x\right )}^3\,\left (n+1\right )\,\left (n+3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cot(e + f*x))^n/sin(e + f*x)^4,x)

[Out]

-(((3*cos(e + f*x))/2 - cos(3*e + 3*f*x)/2 + n*cos(e + f*x))*((d*cos(e + f*x))/(2*cos(e/2 + (f*x)/2)*sin(e/2 +
 (f*x)/2)))^n)/(f*sin(e + f*x)^3*(n + 1)*(n + 3))

________________________________________________________________________________________